<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 对比call 、bind 、 apply 传参情况下
    // var name = '欢', age = 17
    // var obj = {
    //     name: '锋',
    //     ageobj: this.age,
    //     myFun: function (fm,t) {
    //         console.log(this.name + '年龄' + this.age,'来自' + fm + '嫁到' + t);
    //     }
    // }
    // var db = {
    //     name:'欢',
    //     age:17
    // }
    // obj.myFun.call(db, '河北', '河南');
    // obj.myFun.apply(db, ['河北', '河南']);
    // obj.myFun.bind(db, '河北', '河南')();
    // obj.myFun.bind(db, ['河北', '河南'])();



    // function fn(first, last, age, eyecolor) {
    //     this.firstName = first;
    //     this.lastName = last;
    //     this.age = age;
    //     this.eyeColor = eyecolor;
    // }

    // var myFather = new Person('张三','男',50,'已婚')
    // var myMother = new Person('Sallo','nia',40,'buasb')

    // console.log(myFather);
    // console.log(myMother);



    function fun (a,b,c,d,e,f,g) {
        this.aname = a;
        this.bage = b;
        this.csex = c;
        this.ds = d;
        this.es = e;
        this.fs = f;
        this.gs = g;
    }
    var sum = new fun('张三','男','20','未婚','未有对象','前端','10k')
    var num = new fun('李四','男','21','未婚','未有对象','电子厂','5k')
    var num = new fun('熊大','男','21','未婚','有暗恋对象','演员','50k')
    var num = new fun('熊二','男','18','未婚','有暗恋对象','演员','50k')
    var num = new fun('光头钱','男','40','已婚','孩子5岁','演员','60k')
    console.log(sum);
    console.log(num);
</script>

</html>